package playn.game.core;


import playn.core.Image;
import playn.core.Surface;
import playn.core.SurfaceLayer;

import tiled.simple.core.Renderer;

public class StaticRenderer implements Renderer {


	public SurfaceLayer layer;

	public StaticRenderer(SurfaceLayer layer){
		this.layer=layer;
	}
	
	public void putImage(String source, int sx, int sy, int sw, int sh, int dx,int dy, int dw, int dh) {
			Image image=null;
			
			if(!Game.images.containsKey(source)){
				System.out.println("you have to load "+source+" image from loader using imagesCache");
			} else {
				image=Game.images.get(source);
			}

			Surface surface = layer.surface();
			surface.drawImage(image, dx, dy, dw, dh, sx, sy, sw, sh);

	}

}
